package com.itheima_06;

import java.util.concurrent.CountDownLatch;

public class Mother extends Thread {
    private CountDownLatch countDownLatch;
    private String name;
    public Mother(CountDownLatch countDownLatch,String name) {
        this.countDownLatch=countDownLatch;
        super.setName(name);
    }

    @Override
    public void run() {
        try {
            countDownLatch.await();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName()+"收拾碗筷");
    }
}
